import {  createRouter,createWebHashHistory  } from 'vue-router'

import Index from '../components/index.vue'
import Login from '../components/login.vue'
import category from '../components/category.vue'
import user from '../components/user.vue'
import goods from '../components/goods.vue'
import role from '../components/role.vue'
import permission from '../components/permission.vue'
import userRole from '../components/userRole.vue'
import rolePermission from '../components/rolePermission.vue'

const routes = [
  { path: '/', component: Index },
  { path: '/login', component: Login },
  { path: '/category', component: category },
  { path: '/user', component: user },
  { path: '/goods', component: goods },
  { path: '/role', component: role },
  { path: '/permission', component: permission },
  { path: '/userRole', component: userRole },
  { path: '/rolePermission', component: rolePermission },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router